﻿using System;
using System.Windows;

namespace IntoNails.Infrastructure.Views
{
    public class WindowWrapper : IWindow
    {
        private readonly Window _window;

        #region Constructor

        public WindowWrapper()
        {
            this._window = new Window();
        }

        #endregion
        
        #region Implementation of IWindow

        /// <summary>
        /// Ocurrs when the <see cref="Window"/> is closed.
        /// </summary>
        public event EventHandler Closed
        {
            add { this._window.Closed += value; }
            remove { this._window.Closed -= value; }
        }

        public object Content
        {
            get { return this._window.Content; }
            set { this._window.Content = value; }
        }

        public object Owner
        {
            get { return this._window.Owner; }
            set { this._window.Owner = value as Window; }
        }

        public Style Style
        {
            get { return this._window.Style; }
            set { this._window.Style = value; }
        }

        public void Show()
        {
            this._window.Show();
        }

        public void Close()
        {
            this._window.Close();
        }

        #endregion
    }
}
